﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using ORM.Common.DataAnnotations;
using ORM.Resources;

namespace ORM.Business.Models.Entities
{
    public class VotedAnswer
    {
        #region Primitive properties

        public int Id { get; set; }
        [RequiredExtended]
        public int AnswerId { get; set; }

        [RequiredExtended]
        [Column("VotedBy")]
        public int VotedById { get; set; }

        [RequiredExtended]
        public DateTime VotedDate { get; set; }

        public bool IsUpVote { get; set; }

        #endregion

        #region Navigation properties

        [ForeignKey("AnswerId")]
        public virtual Answer Answer { get; set; }

        [ForeignKey("VotedById")]
        public virtual user VotedBy { get; set; }


        #endregion
    }
}